package net.skyaims.sqlmgr.dao;

import java.util.List;

import net.skyaims.sqlmgr.domain.HostTable;

import org.skife.jdbi.v2.sqlobject.Bind;
import org.skife.jdbi.v2.sqlobject.SqlQuery;
import org.skife.jdbi.v2.sqlobject.SqlUpdate;
import org.skife.jdbi.v2.sqlobject.customizers.Mapper;

public interface HostDao {

	@SqlQuery("SELECT * FROM host_tbl h WHERE h.hid = :hid")
	@Mapper(HostTable.class)
	HostTable getIdcById(@Bind("hid") Integer hid);

	@SqlQuery("SELECT * FROM host_tbl")
	@Mapper(HostTable.class)
	List<HostTable> getAll();

	@SqlUpdate("UPDATE host_tbl h SET h.uuid = :uuid WHERE h.hid = :hid")
	void updateUuidById(@Bind("hid") int hid, @Bind("uuid") String uuid);

}
